package isSameAfterReversals;

public class Solution {
    public boolean isSameAfterReversals(int num) {
        return num==rev(rev(num));
    }
    private int rev(int num){
        int res=0;
        while(num>0){
            res=res*10+num%10;
            num/=10;
        }
        return res;
    }
}
